<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://com.am.tag" %>
<%@ include file="../common.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'userList.jsp' starting page</title>
    <script type="text/javascript" src="${path}/js/public/grid.js"></script>
    <style type="text/css">
    	.linkActive{color:#ff9900;text-decoration:none;font-weight:bold;}
		.linkNoActive{color:#3399ff;}
    </style>
	<script type="text/javascript">
		
  		function doQuery(){
  			resetGrid(mygrid,"queryForm");
  		}

  		function doBuyPan(){
  			$.gridToXls(mygrid,"com.system.provider.DrugListProvider","购药计划.xls","id");
  		}
  		
	</script>
  </head>
  
  <body>
  
  	<table cellSpacing="0" cellPadding="0" style="width:100%;height:100%;" border="0">
  		<tr>
			<td class="windowTitle">药品管理  &gt; 购药计划</td>
		</tr>
  		<tr id="">
  			<td style="height:35px;width:100%" class="windowHead">	
	  			<form id="queryForm">
					<table cellSpacing="0" cellPadding="0" width="100%" height="100%" border="0" >
						<tr>
							<td class="">
								药名：<input name="search_CONTAIN_name" id="drugName" class="textbox" style="width: 220px" />&nbsp;&nbsp;&nbsp;&nbsp;
								<ui:Button type="query" onclick="doQuery()">查询</ui:Button>&nbsp;&nbsp;&nbsp;&nbsp;
								<ui:Permission value="drugLibrary_buyPlan">
									<ui:Button id="buyPan" onclick="doBuyPan()"><img src="${path}/images/drug/drugPlan.png">导出</ui:Button>
								</ui:Permission>
							</td>
						</tr>
					</table>
				</form>
				<br/>
				<a style="text-decoration: none;"></a>
			</td>
		</tr>
		
		<tr>
			<td style="width:100%;height:100%;overflow:hidden"  class="windowBody">
				<div id="mess_box" style="width:100%;height:100%;overflow:hidden">
					<ui:Grid id="mygrid" css="width:100%;height:100%"
				    		 onCellClicked="selectedSingleRow2"
				    		 dataProvider="com.system.provider.DrugListProvider:getData" parameters='"value":"1","campus":"${currentUserCampus}","low":"1"'>
				    	<ui:GridField name="id" header="ID" isChecked="true" align="center"/>
				    	<ui:GridField name="name" header="药品名称" align="left" width="20%"/>
				    	<ui:GridField name="vender" header="生产厂商" align="left" width="22%"/>
				    	<ui:GridField name="spec" header="规格" align="center" width="10%"/>
				    	<ui:GridField name="unit" header="单位" align="center" width="10%"/>
				    	<ui:GridField name="supply_price" header="售价" align="center" width="10%"/>
				    	<ui:GridField name="drug_num" header="库存" align="center" width="10%"/>
				    	<ui:GridField name="batch_number_valid" header="批号有效期" align="center" width="15%"/>
			    	</ui:Grid>
		    	</div>
		    </td>
		</tr>
  	</table>
  	<script type="text/javascript">
		$().ready(function(){
			disableSelectAll(mygrid);
		});
	</script>
  </body>
</html>
